package com.shaozi.nc.mq.translation;

import org.apache.log4j.Logger;

import com.shaozi.data.mq.business.base.MqConsts.UserType;
import com.shaozi.data.mq.business.base.SourceTypeConsts.OA.Platform;
import com.shaozi.data.mq.business.bean.MQExchangeData;
import com.shaozi.data.mq.business.bean.MQExchangeRuleBean;
import com.shaozi.data.mq.business.bean.MQPushItem;

/**
 * 平台
 * 
 * @author lyx
 */
public class PlatformPushTranslation extends BaseOaPushTranslation {

	private Logger logger = Logger.getLogger(PlatformPushTranslation.class);

	@Override
	protected int[] onUserType(MQExchangeData data) {
		MQExchangeRuleBean rule = (MQExchangeRuleBean) data.getRule();
		MQPushItem pushItem = rule.getPush();
		switch (pushItem.getSourceType()) {
		case Platform.Role_Change:
			int[] users1 = { UserType.Add, UserType.Delete };
			return users1;
		}
		return super.onUserType(data);
	}
}
